import textwrap

class Site:
    # 构造函数
    def __init__(self,
    id,
    name,
    site,
    province,
    city,
    district,
    street,
    creater
    ) -> None:
        self.__id = id
        self.__name = name
        self.__site = site
        self.__province = province
        self.__city = city
        self.__district = district
        self.__street = street
        self.__creater = creater

    @property
    def id(self):
        return self.__id
    @id.setter
    def id(self,value):
        self.__id = value

    @property
    def name(self):
        return self.__name
    @name.setter
    def name(self,value):
        self.__name = value

    @property
    def site(self):
        return self.__site
    @site.setter
    def site(self,value):
        self.__site = value

    @property
    def province(self):
        return self.__province
    @province.setter
    def province(self,value):
        self.__province = value

    @property
    def city(self):
        return self.__city
    @city.setter
    def city(self,value):
        self.__city = value

    @property
    def district(self):
        return self.__district
    @district.setter
    def district(self,value):
        self.__district = value

    @property
    def street(self):
        return self.__street
    @street.setter
    def street(self,value):
        self.__street = value

    @property
    def creater(self):
        return self.__creater
    @creater.setter
    def creater(self,value):
        self.__creater = value

    def toString(self):
        return textwrap.dedent(f"""\
        id={self.__id},
        name={self.__name},
        site={self.__site},
        province={self.__province},
        city={self.__city},
        district={self.__district},
        street={self.__street},
        creater={self.__creater}.
        """)

    def toDic(self):
        return {
            'id': self.__id,
            'name': self.__name,
            'site': self.__site,
            'province': self.__province,
            'city': self.__city,
            'district': self.__district,
            'street': self.__street,
            'creater': self.__creater
        }
    
    def toCell(self):
        return (
            self.__id,
            self.__name,
            self.__site,
            self.__province,
            self.__city,
            self.__district,
            self.__street,
            self.__creater
        )